<?php
/**
 * This file is part of Hyperf Mall.
 *
 * @link     https://gitee.com/scwlkj/hyperf_mall
 * @contact  hyperf_mall@163.com
 */

namespace App\Repository;

use App\Model\NotifyModel;
use Hyperf\Di\Annotation\Inject;

class NotifyRepository extends BaseRepository
{
    /**
     * @Inject
     * @var NotifyModel
     */
    protected $model;

    public function appIndexList():array
    {
        return $this->_searchFactor()->orderByDesc('id')->limit(5)->get(['title','content','id'])->toArray();
    }
}
